<script lang="ts" setup>
import PageHeader from '../../components/page-header.vue';
import CommonPage from './components/common-page.vue';
interface Props {
  tabs: Record<string, any>;
}

const { tabs } = defineProps<Props>();

enum ModuleCode {
  /** 社会 */
  SOCIETY = 20000,
  /** 治理 */
  GOVERN = 30000
}

const modulesMap = new Map<string, any>([
  ['社会', ModuleCode.SOCIETY],
  ['治理', ModuleCode.GOVERN]
]);
</script>
<template>
  <page-header :title="tabs.name" :menuId="tabs.id" />
  <template v-for="(item, index) in tabs.functions" :key="index">
    <common-page v-if="item.status === 0 && modulesMap.get(tabs.name)" :title="item.name" :menuId="item.id" :code="modulesMap.get(tabs.name)" />
  </template>
</template>
